from collections import namedtuple
Chessman = namedtuple('Chessman', 'Name Value Color')
Checkerboard_Color = (0xE3, 0x92, 0x65)  # 棋盘颜色
BLACK_COLOR = (45,45,45)
WHITE_COLOR = (219, 219, 219)
RED_COLOR = (200, 30, 30)
BLUE_COLOR = (30, 30, 200)
PURPLE_COLOR=(255,0,255)
GREEN_COLOR=(0,255,0)
BLACK_CHESSMAN = Chessman('黑子', 1,BLACK_COLOR)
WHITE_CHESSMAN = Chessman('白子', 2,WHITE_COLOR)
PURPLE_CHESSMAN=Chessman('紫子',3,PURPLE_COLOR)
RED_CHESSMAN=Chessman('红子',4,RED_COLOR)
SIZE = 30  # 棋盘每个棋子间的间隔(中心到中心)
Line_Points = 19  # 棋盘行/列数
Outer_Width = 20  # 棋盘外宽度
Border_Width = 4  # 边框宽度
Inside_Width = 4  # 边框跟实际的棋盘之间的间隔
Border_Length = SIZE * (Line_Points - 1) + Inside_Width * 2 + Border_Width  # 边框线的长度
Start_X = Start_Y = Outer_Width + int(Border_Width / 2) + Inside_Width  # 网格线起点（左上角）坐标
SCREEN_HEIGHT = SIZE * (Line_Points - 1) + Outer_Width * 2 + Border_Width + Inside_Width * 2  # 游戏屏幕的高
SCREEN_WIDTH = SCREEN_HEIGHT + 200  # 游戏屏幕的宽

Stone_Radius = SIZE // 2 - 3  # 棋子半径
Stone_Radius2 = Stone_Radius+6

RIGHT_INFO_POS_X = SCREEN_HEIGHT + Stone_Radius2 * 2 + 10
Point = namedtuple('Point', 'X Y')
offset = [(1, 0), (0, 1), (1, 1), (1, -1)]#可能成功的四个方向
